<!--
 * @FilePath     : /study_code/layui/13-0-1.html
 * @Description  : 转换静态表格为 layui 表格
 * @Date         : 2025-04-07 17:15:20
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-07 17:19:33
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="/layui/dist/css/layui.css" />
  </head>
  <body>
    <table lay-filter="demo">
      <thead>
        <tr>
          <th lay-data="{field:'username', width:100}">昵称</th>
          <th lay-data="{field:'experience', width:80, sort:true}">积分</th>
          <th lay-data="{field:'sign'}">签名</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>贤心1</td>
          <td>66</td>
          <td>人生就像是一场修行a</td>
        </tr>
        <tr>
          <td>贤心2</td>
          <td>88</td>
          <td>人生就像是一场修行b</td>
        </tr>
        <tr>
          <td>贤心3</td>
          <td>33</td>
          <td>人生就像是一场修行c</td>
        </tr>
      </tbody>
    </table>

    <script src="/layui/dist/layui.js"></script>
    <script>
    var table = layui.table
      //转换静态表格
      table.init('demo', {
        height: 420, //设置高度
        limit: 10, //注意：请务必确保 limit 参数（默认：10）是与你服务端限定的数据条数一致
        //支持所有基础参数
      })
    </script>
  </body>
</html>
